home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / TIME_ZON / CLISTBOX.H < prev    next >
Text File  |  1991-11-08  |  1KB  |  35 lines

  1. /* CListBox.h
  2.  
  3.     The CListBox class presents and maintains a list in a window or dialog,
  4.         taking care of pointing and clicking events, and selection of an
  5.         object. Note that GenRoutines is required with this class, and that
  6.         it can be shown in use in the CNameList class.
  7. */
  8.  
  9. #define _H_CListBox
  10.  
  11. #include <CObject.h>
  12.  
  13.  
  14. struct CListBox : CObject {
  15.     ListHandle    theList;        // The List Manager's handle
  16.     Rect        dRect;            // The display rectange for the list
  17.     WindowPtr    theWind;        // The dialog containing the list
  18.     int            itemNo;            // The item of the dialog
  19.     
  20.     void        IListBox(WindowPtr, Rect *, int, int);    // Initialize
  21.     void        Dispose(void);                            // Dispose
  22.     void        SetCell(int, char *);                    // Set a cell's value
  23.     void        GetCell(char *);                        // Get a cell's value
  24.     void        ClearSelect(void);                        // Make no selection
  25.     void        InsertCell(int,char *);                    // Add a new cell
  26.     void        RemoveCell(int);                        // Drop a cell
  27.     void        Draw(void);                                // Frame the list
  28.     void        Update(void);                            // Draw the list
  29.     Boolean        IsIn(Point);                            // In Point inside?
  30.     void        DoClick(Point, EventRecord *);            // The list is clicked
  31. };
  32.  
  33. pascal void draw_list(WindowPtr,int);
  34. pascal Boolean check_list(DialogPtr,EventRecord *,int *);
  35.